;(ns PathFinderTests.PathFinderTest)
;
;(use 'pathfinder-algorithm)
;
;;
;;
;;(def pg-map {[0 0] {:status "notempty" :h 0 :g 10 :f 0 :parent nil}
;;                     [0 1] {:status "empty" :h 0 :g 0 :f 0 :parent nil}
;;                     [0 2] {:status "s" :h 0 :g 0 :f 0 :parent nil}
;;                     [0 3] {:status "notempty" :h 0 :g 0 :f 0 :parent nil}
;;                     [1 0] {:status "notempty" :h 0 :g 0 :f 0 :parent nil}
;;                     [1 1] {:status "empty" :h 0 :g 0 :f 0 :parent nil}
;;                     [1 2] {:status "notempty" :h 0 :g 0 :f 0 :parent nil}
;;                     [1 3] {:status "notempty" :h 0 :g 0 :f 0 :parent nil}
;;                     [2 0] {:status "notempty" :h 0 :g 0 :f 0 :parent nil}
;;                     [2 1] {:status "empty" :h 0 :g 0 :f 0 :parent nil}
;;                     [2 2] {:status "f" :h 0 :g 0 :f 0 :parent nil}
;;                     [2 3] {:status "notempty" :h 0 :g 0 :f 0 :parent nil}})
;;
;;;set playgroundmap
;;(set-playground-map pg-map)
;;;set parent
;;(def assigned-node (pathfinder-algorithm/assign-parent (val (find pg-map [0 0])) (find pg-map [0 1])))
;;
;;(get-parent assigned-node)
;;
;;(calculate-f (find  pg-map [0 0]))
;;
;;(calculate-g (find pg-map [0 0]) (find pg-map [0 1]))
;;
;;(calculate-h (find pg-map [0 1]))
;;
;;
;;;(def node10 (find pg-map [1 1]))
;;;(def node10 (find (assoc pg-map (key node10) (calculate-g (find pg-map [0 0]) node10)) (key node10)))
;;;(def node10 (calculate-h node10))
;;;node10
;;
;;;only for s i f (start and finish)
;;(def f-node (get-special-node-position  "f"))
;;(get-special-node-position "w")
;;
;;;sets f-position
;;(set-f-position f-node)
;;;calculate h must get first of f-node-position couse get-special-node-position
;;;returns list of vectors
;;(calculate-h (find pg-map [0 1]))
;;
;;pathfinder-algorithm/open-list
;;
;;(remove-node-from-open-list (find pg-map [0 1]))
;;
;;pathfinder-algorithm/open-list
;;
;;(add-nodes-to-open-list (find pg-map [0 2]))
;;pathfinder-algorithm/open-list
;
;
;
;;(def node10 (find pg-map [0 0]))
;;(def against-node (find pg-map [0 1]))
;;(def node10 (calculate-g node10 against-node))
;;      (def node10 (calculate-h node10))
;;      (def node10 (calculate-f node10))
;;      ;node
;;(def open-list1 #{})
;;      (def open-list1 (conj open-list node10))
;
;(def pg-map {[0 0] {:status "notempty" :h 0 :g 10 :f 0 :parent nil}
;                     [0 1] {:status "empty" :h 0 :g 0 :f 0 :parent nil}
;                     [0 2] {:status "s" :h 0 :g 0 :f 0 :parent nil}
;                     [0 3] {:status "notempty" :h 0 :g 0 :f 0 :parent nil}
;                     [1 0] {:status "notempty" :h 0 :g 0 :f 0 :parent nil}
;                     [1 1] {:status "empty" :h 0 :g 0 :f 0 :parent nil}
;                     [1 2] {:status "notempty" :h 0 :g 0 :f 0 :parent nil}
;                     [1 3] {:status "notempty" :h 0 :g 0 :f 0 :parent nil}
;                     [2 0] {:status "notempty" :h 0 :g 0 :f 0 :parent nil}
;                     [2 1] {:status "empty" :h 0 :g 0 :f 0 :parent nil}
;                     [2 2] {:status "f" :h 0 :g 0 :f 0 :parent nil}
;                     [2 3] {:status "notempty" :h 0 :g 0 :f 0 :parent nil}})
;(set-playground-map pg-map)
;
;(set-f-position (get-special-node-position  "f"))
;
;(set-s-position (get-special-node-position  "s"))
;
;(find-path)
;(find pathfinder-algorithm/playground-map [0 2])
;pathfinder-algorithm/open-list
;pathfinder-algorithm/closed-list
;
;;(calculate-g (find pathfinder-algorithm/playground-map [0 2]) (find pathfinder-algorithm/playground-map [0 1]))